package top.resty.erp.dao;

import org.apache.ibatis.annotations.*;
import top.resty.erp.domain.Type;

import java.util.List;

/**
 * <pre>
 *
 * </pre>
 *
 * @author : resty
 * @date : 2021年03月23 00:15
 */
@Mapper
public interface IType {
	
	@Insert("insert into tb_type values(null,#{name},#{varietyId})")
	public int saveType(Type type);
	
	
	@Select("select * from tb_type where variety_id = #{id}")
	public List<Type> findById(Integer id);
	
	@Update("update tb_type set name = #{name} where id = #{id}")
	public int updateType(Type type);
	
	@Delete("delete from tb_type where id = #{id}")
	public int deleteType(Integer id);
	
}
